#include<VertexBuffer.hpp>
#include<renderpch.hpp>

VertexBuffer::VertexBuffer(const void* data,unsigned int size)
{
   glGenBuffers(1, &my_RendererID);
   glBindBuffer(GL_ARRAY_BUFFER, my_RendererID);
   glBufferData(GL_ARRAY_BUFFER, size, data, GL_STATIC_DRAW);
}


VertexBuffer::~VertexBuffer()
{
    glDeleteBuffers(1,&my_RendererID);
}


void VertexBuffer::Bind()
{

   glBindBuffer(GL_ARRAY_BUFFER, my_RendererID);
}



void VertexBuffer::UnBind()
{
   glBindBuffer(GL_ARRAY_BUFFER, 0);

}